-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Modernize TBB CMake setup by exclusively relying on CMake namespace targets #3207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize TBB CMake setup by exclusively relying on CMake namespace targets #3207
Conversation
|
Filed as internal issue #USD-9934 |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d17762c to
a1075a6
Compare
|
Hey @jesschimein I have reproduced yesterday issues locally when building without using oneTBB and I have pushed a new fix to accommodate those. |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hi @jesschimein , I am not sure to understand whether the last azure pipeline run for windows is a genuine error or not. |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Yeah, some of the timeouts are a little fickle, and we usually rerun to check. Looks like Windows successfully built this time! 🙌🏻 |
|
Hi @jesschimein there is now a large list of conflicts, if I resolve them is there a good chance to integrate my change for the next release ? |
|
Hi @theblackunknown , we would like to consider this for one of the shortly upcoming releases, so yes please, could you resolve the conflicts (which came about from our added support for OneTBB, I think), and also ensure the changes work with OneTBB as well as a stock build_usd.py build? Thank you! |
Sure thing ! I'll allocate time in the following two weeks to rebase my work and test my changes. |
812516f to
62521c4
Compare
|
/AzurePipelines run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
@spiffmon I have rebased and did confirm that my changes work with That said, it looks like I need to rebase one more time my changes. |
62521c4 to
78af421
Compare
|
/AzurePipelines run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
@jesschimein @spiffmon I believe this PR is now ready to do, is this schedule on your internal queue for some later release ? |
|
Yes, @theblackunknown ! There's not enough time in the 25.05 release that we are wrapping up this week, but we have it queued for the release after that - thank you! |
|
/AzurePipelines run |
…argets Using CMake namespace target is the modern approach, it forward definitions, include directories and link libraries transitively to consumers. And one is already setup by the `FindTBB.cmake` module. As the main CMakeLists.txt already requires CMake 3.14 this should already be available to all CMake clients. - Additionally try to resolve TBB Config package before trying the module one. - Add missing linkage to TBB to targets which use it directly - Remove extra linkage to TBB to targets which dot not use it directly - Add missing call to `find_dependency(TBB ..)` to resolve indirect dependencies - Fix typo in FindTBB - Implement heuristic to resolve import/shared libraries on Windows
78af421 to
1db4a35
Compare
|
/AzurePipelines run |
|
Thank you for submitting this fix! I did have to make one small additional modification to FindTBB.cmake in order to fix a linker issue with the linux build. Adding the We are planning to include this fix in the 25.08 release. |
Adds additional targets for TBB components. Updates various CMakeLists.txt files to use TBB::tbb component Removes explicit TBB dependencies from CMakeLists.txt files for modules for which it is not necessary Updates pch headers for modules which do not utilize TBB Closes PixarAnimationStudios#3207 (Internal change: 2369739) (Internal change: 2369797)
Description of Change(s)
Using CMake namespace target is the modern approach, it forwards definitions, include directories and link libraries transitively to consumers.
One
TBB::tbbis already produced by theFindTBB.cmakemodule.As the main CMakeLists.txt already requires CMake 3.14 this should already be available to all CMake clients.
Additionally try to resolve TBB Config package before trying the module one.
Miscellaneous associated cleanups are made with remaining commits.